From 366ca1710bf63719bc7532e3633f1f8e88ab1a3d Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 13 Sep 2005 16:56:02 +0000 Subject: [PATCH] IntroduceDomain of dom0 can fail when it's already connected. Signed-off-by: Christian Limpach --- tools/python/xen/xend/XendDomainInfo.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index d75d872b5c..77d59e23f1 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -27,6 +27,7 @@ import string, re import os import time import threading +import errno import xen.lowlevel.xc; xc = xen.lowlevel.xc.new() from xen.util.ip import check_subnet, get_current_ipgw @@ -1097,7 +1098,14 @@ class XendDomainInfo: ref = xc.init_store(self.store_channel.port2) if ref and ref >= 0: self.setStoreRef(ref) - IntroduceDomain(self.id, ref, self.store_channel.port1, self.path) + try: + IntroduceDomain(self.id, ref, self.store_channel.port1, + self.path) + except RuntimeError, ex: + if ex.args[0] == errno.EISCONN: + pass + else: + raise # get run-time value of vcpus and update store self.exportVCPUSToDB(dom_get(self.id)['vcpus']) -- 2.30.2